<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<script src="<%=basePath%>resources/js/common/plugin/bootstrap/js/bootstrap-validation.js"></script>


<title>新增/修改</title>

<style type="text/css"> 
.modal-table{width:100%;}
.modal-table tr{line-height:35px;}
.modal-table th{width:20%;text-align:right;padding-right:10px;font-weight: normal;}
.modal-table td{width:30%;}

.date-alarm-ul {
    border-bottom: 1px solid #ccc;
}
 .date-alarm .line,
 .date-alarm .line{
	bottom:0;
	left:0;
	width:100px;
	height:2px;
	background:#e77817;
	transition:all .3s;
	-webkit-transition:all .3s;
	-moz-transition:all .3s;
	-ms-transition:all .3s;
	-o-transition:all .3s;
}
.list {
    width: 100px;
    padding: 5px 0;
    text-align: center;
}
.fl {
    float: left;
}
input{
	padding-left:8px;
}
select{
	padding-left:4px;
}
#imgPreviewID{
	display:block;
	width:200px;
	height:200px;
	margin:0 auto;
}
/* .alertaddup {cursor:pointer; position:absolute; left:180px; top:0;} */
</style> 
<script type="text/javascript">
var vehicleId = '${vehicleId}';
var action = '${action}';
var imgPath = '${imgPath}';
var voname ='${vo.name}';
var yuanimgUrl ='${vo.img_url}';
</script>
</head>
<body>
<form id="vehicleForm">
			<div id="baseInfoDiv" class="pr">
			<table class="modal-table">
<!-- 				<tr style="height: 13px;width:416px;"></tr> -->
				<tr>
					<th>从业人员姓名：</th>
					<td>
						<input class='placeholder' type="text" style="height: 24px;width:208px;" id="orgnCode" name="name" 
						required="required" placeholder="从业人员姓名" value="${vo.name}" />
						<font style="color:#f00;margin-left:3px">*</font></td>
					<th>所属业户：</th>
					<td>
						<select  style="width:208px;text-align:center;" name="enprise_id" id="enprise_id">
						</select>
					<font style="color:#f00;margin-left:3px">*</font>
					<input type="hidden" value="${vo.enterprise_id}" id="enprise" />
				</tr>
<!-- 				<tr style="height:13px;width:416px;"></tr> -->
				<tr>
					<th>身份证号：</th>
					<td>
						<input class='placeholder' type="text" style="height: 24px;width:208px;" id="id_card" name="id_card" 
						required="required"  placeholder="身份证号" value="${vo.id_card}" />
						<font style="color:#f00;margin-left:3px">*</font>
					</td>
					<th>车牌号码：</th>
					<td>
						<select  style="width:208px;text-align:center;" name="vehicle_id" id ="vehicle_id" >
						</select>
					<input type="hidden" value="${vo.vehicle_id}" id="vehicle_no" />
				</tr>
				<tr>
					<th>驾驶证：</th>
					<td>
						<input class='placeholder' type="text" style="height: 24px;width:208px;" id="driver_licence" 
						name="driver_licence" required="required" placeholder="驾驶证" value="${vo.driver_licence}" />
						<font style="color:#f00;margin-left:3px">*</font>
					</td>
					<th>驾驶类型：</th>
					<td>
				        <select  style="width:208px;text-align:center;" name="drive_type" id ="drive_type" >
				            <option value="">请选择驾驶类型</option>
				            <option value="1" ${vo.drive_type==1?"selected='selected'":""} >客车</option>
				            <option value="2" ${vo.drive_type==2?"selected='selected'":""}>危险品</option>
				            <option value="3" ${vo.drive_type==3?"selected='selected'":""}>货运车</option>
				        </select><font style="color:#f00;margin-left:3px">*</font>
					</td>
				</tr>
				<tr>
					<th>发证机关：</th>
					<td>
						<select  style="width:208px;text-align:center;" name="lssuing_auth_id" id="lssuing_auth_id" >
							<option value=""  >请选择发证机关</option>
						</select>
						<font style="color:#f00;margin-left:3px">*</font>
						<input type="hidden" value="${vo.lssuing_auth_id}"  id="lssuing" />
					</td>
					<th>从业资格证号：</th>
					<td>
						<input class='placeholder' type="text" style="height: 24px;width:208px;" 
						id="licence" name="licence" required="required" placeholder="从业资格证号" value="${vo.licence}" />
						<font style="color:#f00;margin-left:3px">*</font>
					</td>
				</tr>
				<tr>
					<th>资格证初领时间：</th><td>
						<input type="text" class='placeholder' id="acquire_time" name="acquire_time" 
						placeholder="资格证初领时间" value="<fmt:formatDate value='${vo.acquire_time}' pattern='yyyy-MM-dd'/>" 
						style="height: 24px;width:208px;padding-left:8px;"  class="query-input fl Wdate Time_input" 
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-{%d}'})"/>
						<font style="color:#f00;margin-left:3px">*</font>
               		</td>
					<th>资格证发证时间：</th><td>
						<input class='placeholder' type="text" id="grant_time" name= "grant_time"  placeholder="资格证发证时间"  value="<fmt:formatDate value='${vo.grant_time}' pattern='yyyy-MM-dd'/>" 
						style="height: 24px;width:208px;padding-left:8px;"  class="query-input fl Wdate Time_input" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-{%d}'})"/><font style="color:#f00;margin-left:3px">*</font>
               		</td></tr>
<!-- 				<tr style="height:13px;width:416px;"></tr> -->
				<tr>
					<th>证件有效期开始时间：</th><td>
						<input class='placeholder' type="text" id="invalid_start_time" name="invalid_start_time"  placeholder="证件有效期开始时间" value="<fmt:formatDate value='${vo.invalid_start_time}' pattern='yyyy-MM-dd'/>" 
						style="height: 24px;width:208px;padding-left:8px;"  class="query-input fl Wdate Time_input" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'invalid_end_time\')}'})"/><font style="color:#f00;margin-left:3px">*</font>
               		</td>
					<th>证件有效期结束时间：</th><td>
						<input class='placeholder' type="text" id="invalid_end_time" name= "invalid_end_time"  placeholder="证件有效期结束时间"  value="<fmt:formatDate value='${vo.invalid_end_time}' pattern='yyyy-MM-dd'/>" 
						style="height: 24px;width:208px;padding-left:8px;"  class="query-input fl Wdate Time_input" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'invalid_start_time\')}'})"/><font style="color:#f00;margin-left:3px">*</font>
               		</td>
               	</tr>
<!-- 				<tr style="height:13px;width:416px;"></tr> -->
				<tr>
					<th>联系号码：</th><td><input  type="text" style="height:24px;width:208px;" id="phone"  name="phone"  required="required"  placeholder="联系电话" value="${vo.phone}" /><font style="color:#f00;margin-left:3px">*</font>
					<th>用户头像：</th><td><input type="hidden" id="img_url"  name="img_url" value="${vo.img_url}"/> <a id="a_iconPhoto" style="color: blue;" href="#" onclick="openPhotoModal('icon','a_iconPhoto')" >点击上传</a></td>
				</tr>
<!-- 				<tr style="height:13px;width:416px;"></tr> -->
				<tr>
					<th>证照状态：</th><td>
					<select  style="width:208px;text-align:center;" name='status' id="status" >
					<option value="" >请选择证照状态 </option>
					<option value="10" ${vo.status==10?"selected='selected'":""}>从业</option>
					<option value="20" ${vo.status==20?"selected='selected'":""} >行业</option>
					<option value="0" ${vo.status==0?"selected='selected'":""}>注销</option>
					</select>
						<font style="color:#f00;margin-left:3px">*</font>
					</td>
               		<th>短信提醒：</th><td>
               		<select  style="width:60px;text-align:center;" name="enable_sms" id ="enable_sms">
               		<option value="1" ${vo.enable_sms==1?"selected='selected'":""}>启用 </option>
               		<option value="0" ${vo.enable_sms==0?"selected='selected'":""}>停用</option>
               		</select>
               		</td>
				</tr>
			</table>
			<c:if test="${!empty vo.id}"><input type="hidden"  name="id"  value="${vo.id}" /></c:if>
			<input type="hidden" id="state" value="0" />
			<div class="TerminalPanel pa">
				<a class="close pa" href="javascript:;" title="关闭"></a>
				<div class="menu_arrow pa"></div>
			</div>
				<!-- 图片上传公共 模态框 -->
			<div id="upPhotoModal" class="modal hide" data-backdrop = "static" style="display:none;left: 55%;top: 15%;width: 350px;">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h3 id="upPhotoTitle">上传图片</h3>
				</div>
				<div class="modal-body" style="font-size: 13px;vertical-align: middle;">
					<div id="upPhotoInfo" class="dialog_f_c">
					   <img id="imgPreviewID" <c:if test="${!empty vo.img_url}">src="${imgPath}/${vo.img_url}"</c:if> <c:if test="${empty vo.img_url}"> src="<%=basePath%>resources/images/touxiang.jpg"</c:if> name="imgPreviewID" alt="" width="200" height="200" /><br /> <!-- 上传控件 --> 
				       <input type="file" id="uploadify" name="uploadify" style="width: 160px;line-height:24px;padding-left:0" />
				       <input id="btnUpload" type="button" style="width: 70px;margin-right: 20px;" class="btn_a btn-primary_a"  value="上传"/>
				       <a id="aDeleteImg" href="#" class="btn">删除</a>
					</div>
				</div>
				<div class="modal-footer">
					<a href="#" class="btn btn-primary" onclick="closePhotoModal()">保存</a>
				</div>
			</div>
			</div>
		</form>
		<script src="<%=basePath%>resources/js/business/base/pubdriver/addpubdriver.js"></script>
</body>
</html>